﻿Imports System.ComponentModel.DataAnnotations
Imports System.ComponentModel.DataAnnotations.Schema

<Table("Contrato")>
Public Class Contrato
    Implements IEntity

    <DatabaseGenerated(DatabaseGeneratedOption.Identity)>
    <Key()>
    Public Property IdContrato() As Integer

    Public Property Fecha() As DateTime

    Public Property Total() As Decimal

    Public Property Anulado() As Boolean

    Public Property NumeroContrato() As Integer

    Public Property IdCliente() As Integer

    <ForeignKey("IdCliente")>
    Public Property Cliente() As Cliente

    Public Overridable Property DetalleContratos() As ICollection(Of DetalleContrato)

    <NotMapped()>
    Public Property ID() As Integer Implements IEntity.ID
        Get
            Return IdContrato
        End Get
        Set(ByVal value As Integer)
            IdContrato = value
        End Set
    End Property
End Class
